﻿@model ASC.Models.ModuleViewModel
@using ASC.Resources;
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<table style="width:570px">
    <tr>
        <td  class="centerAlign">
            <table class="maxWidth">
                <tr>
                    <td class="centerAlign">
                        <h2>@Global.FrmModuleAdd</h2>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <table>
                <tr>
                    <td class="rightAlign" style="width: 100px">
                        @Channel.ChannelName:
                    </td>
                    <td class="leftAlign">
                        @Html.TextBoxFor(x => x.Channel.Name)
                    </td>
                    <td class="rightAlign">
                        @Channel.No:
                    </td>
                    <td class="leftAlign">
                        @Html.TextBoxFor(x => x.Channel.OrdNr, new { style = "width:38px;", disabled = "disabled" })
                    </td>
                    <td class="rightAlign" style="width: 100px">
                        @Channel.Type:
                    </td>
                    <td>
                        <select name="Channel.ChannelType_Id" style="width: 140px">
                            @foreach (var item in Model.ListChannelType)
                            {
                                <option value="@item.ChannelType_Id">@item.Description</option>
                            }
                        </select>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <table>
                <tr>
                    <td class="rightAlign" style="width: 100px">
                        @Channel.Description:
                    </td>
                    <td class="leftAlign">
                        @Html.TextBoxFor(x => x.Channel.Description, new { style = "width:190px;" })
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <table>
                <tr>
                    <td>@Html.CheckBox("Inverted", false, new { disabled = "disabled" })
                    </td>
                    <td>@Channel.Inverted
                    </td>
                    <td>@Html.CheckBoxFor(x => x.Channel.SaveStat)
                    </td>
                    <td>@Channel.StoringStatistic
                    </td>
                    <td>@Html.CheckBox("Remark", false, new { disabled = "disabled" })
                    </td>
                    <td>@Channel.Remark
                    </td>
                    <td>@Html.CheckBox("Async", false)
                    </td>
                    <td>@Channel.Async
                    </td>
                    <td class="rightAlign" style="width: 100px">@Channel.Transformation:
                    </td>
                    <td>
                        <select name="Channel.Transtype" style="width: 140px">
                            <option value="0">&lt;none&gt;</option>
                            <option value="1">A/D conversion</option>
                            <option value="2">Peeling</option>
                            <option value="3">Pulse/value-conversion</option>
                        </select>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <table>
                <tr>
                    <td>@Channel.ConnectTo:
                    </td>
                    <td>
                        <select name="Transtype" style="width: 140px;" disabled="disabled">
                            <option value="0"></option>
                        </select>
                    </td>
                    <td class="rightAlign" style="width: 80px">@Channel.SamplingInterval
                    </td>
                    <td>
                        @Html.TextBoxFor(x => x.Channel.Interval, new { style = "width:30px;", disabled = "disabled" })
                    </td>
                    <td style="width: 25px">@Channel.Sec
                    </td>
                    <td>
                        <table cellspacing="0" cellpadding="0">
                            <tr>
                                <td>@Channel.Factor:
                                </td>
                                <td>@Html.TextBoxFor(x => x.Channel.Interval, new { style = "width:50px;" })
                                </td>
                            </tr>
                            <tr>
                                <td>@Channel.Offset:
                                </td>
                                <td>@Html.TextBoxFor(x => x.Channel.Offset, new { style = "width:50px;", disabled = "disabled" })
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <fieldset style="width: 560px">
                <legend>@Channel.IO_Adress</legend>
                <table>
                    <tr>
                        <td style="width: 80px">@Channel.WordLength
                        </td>
                        <td style="width: 80px">@Channel.Driver
                        </td>
                        <td style="width: 80px">@Channel.Loop
                        </td>
                        <td style="width: 80px">@Channel.Unit
                        </td>
                        <td style="width: 80px">@Channel.SubUnit
                        </td>
                        <td style="width: 80px">@Channel.Word
                        </td>
                        <td style="width: 80px">@Channel.Bit
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <select name="WordLength" style="width: 40px">
                                <option value="-1"></option>
                                <option value="0">4</option>
                                <option value="1">8</option>
                                <option value="2">16</option>
                                <option value="4">32</option>
                            </select>
                        </td>
                        <td>
                            <select name="Driver" style="width: 60px">
                                <option value="0">Test</option>
                                <option value="1">Siox</option>
                                <option value="2">PLCinPC</option>
                                <option value="3">Profibus</option>
                                <option value="4">DDE</option>
                                <option value="5">Backhoff</option>
                                <option value="6">ADSBackhoff</option>
                                <option value="7">ADSBeSR</option>
                                <option value="8">OPC_Beijer</option>
                                <option value="9">SQLDriver</option>
                                <option value="10">FileDriver</option>
                                <option value="11">FileDriverB1</option>
                            </select>
                        </td>
                        <td>
                            @Html.TextBox("Loop", "", new { style = "width:50px;" })
                        </td>
                        <td>
                            @Html.TextBox("Un it", "", new { style = "width:50px;" })
                        </td>
                        <td>
                            @Html.TextBox("SubUnit", "", new { style = "width:50px;" })
                        </td>
                        <td>
                            @Html.TextBox("Word", "", new { style = "width:50px;" })
                        </td>
                        <td>
                            @Html.TextBox("Bit", "", new { style = "width:50px", disabled = "disabled" })
                        </td>
                    </tr>
                </table>
            </fieldset>
        </td>
    </tr>
    <tr>
        <td>
            <fieldset style="width: 560px">
                <table>
                    <tr>
                        <td style="width: 140px" class="centerAlign">
                            @Channel.AvailableChannels
                        </td>
                        <td style="width: 140px">
                            <input type="radio" name="mean" disabled="disabled" />&nbsp;@Channel.Mean
                        </td>
                        <td colspan="2" class="centerAlign">
                            @Channel.SelectedChannels
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <input type="radio" name="Sum" disabled="disabled" checked="checked" />&nbsp;@Channel.Sum
                        </td>
                        <td style="width: 140px" class="centerAlign">
                            @Channel.Plus
                        </td>
                        <td style="width: 140px" class="centerAlign">
                            @Channel.Minus
                        </td>
                    </tr>
                    <tr>
                        <td>
                            @Html.TextArea("AvailableChannels", new { style = "height:150px; overflow:auto", disabled = "Disabled" })
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td>
                                        <input type="button" name="btn1" value="=> +" class="StandartButton" disabled="Disabled" />
                                    </td>
                                </tr>
                   
                            <tr>
                                <td>
                                    <input type="button" name="btn2" value="=> -" class="StandartButton" disabled="Disabled" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="button" name="btn3" value="=>> +" class="StandartButton" disabled="Disabled" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="button" name="btn4" value='&lt;=' class="StandartButton" />
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td>
                        @Html.TextArea("Plus", new { style = "height:150px; overflow:auto", disabled = "Disabled" })
                    </td>
                    <td>
                        @Html.TextArea("Minus", new { style = "height:150px; overflow:auto", disabled = "Disabled" })
                    </td>
                </tr>
            </table>
</fieldset> 
</td> 
</tr>
<tr>
    <td class="rightAlign">
        <table class="maxWidth">
            <tr>
                <td class="rightAlign">
                    <input type="button" name="Save" value="@Global.Save" class="StandartButton" />
                </td>
                <td class="leftAlign">
                    <input type="button" name="Cancel" value="@Global.Cancel" class="StandartButton" />
                </td>
            </tr>
        </table>
    </td>
</tr>
</table> 